package share.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import share.service.RevenueReportService;
import share.service.model.RevenueReportListModel;

@Controller
@RequestMapping("revenueReport")
public class RevenueReportController {

    @Autowired
    private RevenueReportService revenueReportService;
    // localhost:8081/revenueReport/save?id=10
    @GetMapping("save")
    public String addRevenueReport(Integer id) {
        System.out.println(id);
        return "revenueReport/addRevenueReport";
    }

    @PostMapping("saveInfo")
    @ResponseBody
    public String addRevenueReport(@RequestBody RevenueReportListModel revenueReportModel) {
        
        return revenueReportModel.toString();
    }

}
